/* 
 *  <copyright file="BaseProcess.cs" company="Wesley Jowitt">
 *  
 *  SobrietyEngine: Copyright (c) 2011 Wesley Jowitt
 *  
 *  This software is distributed under a software license.
 *   * As of the creation time of this file, the license in use is the Microsoft Permissive License (Ms-PL) 
 *    * The license can be viewed at:
 *     * License.Txt in the root folder of this project
 *      * http://sobrietyengine.codeplex.com/license
 *       * http://www.microsoft.com/opensource/licenses.mspx
 *       
 *  </copyright>
 *   */

using System;

using SobrietyEngine.Guids;

namespace SobrietyEngine.Processes
{
    class BaseProcess: IProcess
    {
        Double Time;
        CGuid Guid;
        String Type;

        public BaseProcess(String name, String type, Double time)
        {
            Time = time;
            Guid = CGuid.Create(name, this);
            Type = type;
        }

        public void SetGuid(CGuid guid)
        {
            Guid = guid;
        }

        public void Kill()
        {
            Guid.Remove();//kills this objects guid
        }

        #region IProcess Members

        public double GetTime()
        {
            return Time;
        }

        public SobrietyEngine.Guids.CGuid GetGuid()
        {
            return Guid;
        }

        new public string GetType()
        {
            return Type;
        }

        public void SetTime(double time)
        {
            Time = time;
        }

        public void DoProcess()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion
    }
}
